package chapter22.homework02;
import java.util.Observable;
import java.util.Observer;

//具体的观察者对象，实现更新的方法，使自身的状态和目标的状态保持一致
public class ConcreteObserver implements Observer{
    //观察者的名字
    private String observerName;
    //本系的名称
    private String departmentName;

//    @Override
//    public void update(ManageSubject subject) {
//        departmentName = ((ConcreteManageSubject)subject).getDepartmentName();
//        System.out.println(observerName + "所在系的名称是： " + departmentName);
//    }
    public String getObserverName() {
        return observerName;
    }
    public void setObserverName(String observerName) {
        this.observerName = observerName;
    }

    public String getDepartmentName() {
        return departmentName;
    }
    public void setDepartmentName(String departmentName) {
        this.departmentName = departmentName;
    }

    @Override
    public void update(Observable o, Object arg) {
        System.out.println("");
    }
}